﻿@model ElectrosLtd.Models.FaultModel

@{
    ViewBag.Title = "SubmitFault";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Report Fault</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.Username)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Username)
            @Html.ValidationMessageFor(model => model.Username)
        </div>

        <div class="editor-label">
            <h6>Token Password</h6>
        </div>
        <div class="editor-field">
            @Html.PasswordFor(model => model.Password)
            @Html.ValidationMessageFor(model => model.Password)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PIN)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PIN)
            @Html.ValidationMessageFor(model => model.PIN)
        </div>

        <div class="editor-field">
            @Html.HiddenFor(model => model.ProductID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Details)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Details)
            @Html.ValidationMessageFor(model => model.Details)
        </div>
        <h4>Categorise Fault?</h4>
        <div>
        @Html.DropDownListFor(model=> model.CategoryID, Model.CategoryList, "Select a category")
        </div>
        <p>
            <input type="submit" value="Report Fault" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to Orders", "MyOrders", "Home")
</div>
